import { ApiProperty } from '@nestjs/swagger';
import { IsNumber, IsNotEmpty, IsOptional, IsBoolean } from 'class-validator';

export class BindPlayerE2PDto {
  @ApiProperty({ description: 'ID', example: 1 })
  @IsNumber()
  @IsNotEmpty()
  id: number;

  @ApiProperty({ description: '玩家 1 的 ID', example: 101 })
  @IsNumber()
  @IsOptional()
  playerId: number;

  @ApiProperty({ description: '玩家 2 的 ID', example: 102 })
  @IsNumber()
  @IsOptional()
  player2Id: number;

  @ApiProperty({ description: '是否是轮空' })
  @IsBoolean()
  isByePlayer: boolean = false; // 是否轮空
}
